n,m=input().split(' ')
n=int(n)
m=int(m)
arr=list()
flag=1
for i in range(0,n):
    s=input().split(' ')
    arr.append(s)
for i in range(0,n):
    for j in range(0,m):
        if i+1<n and eval(arr[i][j])>eval(arr[i+1][j]):
            if j+1<m and eval(arr[i][j])>eval(arr[i][j+1]):
                if i-1>=0 and eval(arr[i][j])>eval(arr[i-1][j]):
                    if j-1>=0 and eval(arr[i][j])>eval(arr[i][j-1]):
                        print(eval(arr[i][j]),i+1,j+1)
                        flag=0
if flag:
    print("None",n,m)